<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="stylesheet" href="https://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.css">
		<script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
		<script src="https://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>

		<link rel="stylesheet" href="css/style.css" />
		<!-- 登录验证 -->
		<script>
			//若用户已经登录，则无需再看到此页面
			var logstatu = sessionStorage['LoginName'];
			console.log("name is " + name);
			console.log("statu is " + logstatu);
			if (logstatu) {
				location.href = 'index.html';
				console.log(logstatu);
			}
		</script>


		<title>登陆</title>
		<script>
			$.mobile.ajaxEnabled = false;
		</script>
	</head>
	<body>
		<div data-role="page">
			<div data-role="header" id="opcitybg">
				<h1>登陆</h1>
			</div>

			<div data-role="main" class="ui-content">
				<div id="logincon" data-inset="true">
					<form method="get" action="index.html">
						<div class="ui-field-contain">
							<label for="uname">账号：</label>
							<input type="text" name="uname" id="uname" placeholder="用户名">
							<label for="password">密码：</label>
							<input type="password" name="password" id="password">
						</div>
						<div id="cbt">

							<input type="button" name="btSubmit" id="btSubmit" data-inline="true" value="登陆">
							<input type="reset" data-inline="true" value="重置">
							<br />
							<a href="c_register.html">注册用户</a>&nbsp;&nbsp;
							<a href="c_findPassword.html">忘记密码</a>
						</div>
					</form>
				</div>
			</div>

			<div data-role="footer" data-position="fixed" id="footerbg">
				<p style="text-align:center;color: #FFAA00;">copyright@chen</p>
			</div>

		</div>
	</body>
	<script type="text/javascript" src="js/login/checkMessage.js"></script>
	<script type="text/javascript">
		uname.onchange = function() {
			isName(uname.value, 'c_register.html');
		}

		console.log(uname.value);
		btSubmit.onclick = function() {
			login(uname.value, password.value, 'index.html');
		}
	</script>
</html>
